package redis.client.nedis;

import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToByteEncoder;
import redis.client.nedis.commands.RedisCommand;

/**
 * @author gaodong
 * @version 1.0
 * @date 2020/11/18 11:25
 */
public class RedisCommandEncoder extends MessageToByteEncoder<RedisCommand> {

    @Override
    protected void encode(ChannelHandlerContext ctx, RedisCommand msg, ByteBuf out) throws Exception {
        msg.write(out);
    }
}
